package pe.edu.upc.dsd.whereeat.rest;

import java.util.Date;
import java.util.List;

import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Response;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.google.gson.Gson;

import pe.edu.upc.dsd.whereeat.domain.Categoria;
import pe.edu.upc.dsd.whereeat.domain.Plato;
import pe.edu.upc.dsd.whereeat.domain.Restaurant;
import pe.edu.upc.dsd.whereeat.service.CategoriaplatoService;
import pe.edu.upc.dsd.whereeat.service.PlatoService;

@Path("/categoriaPlatos")
/* Identifica al servio Web */
//@Produces("text/plain")
@Consumes("text/plain")
@Produces("application/json")
public class CategoriaPlatoWS {

	@Autowired
	private CategoriaplatoService  categoriaplatoService;
	
	Gson gson = new Gson();


	@GET
	@Path("/listado")
	public Response listar() throws Exception {
		//return platoService.findAll();
		return Response.ok(gson.toJson(categoriaplatoService.findAll())).build();
	}


}
